Test mode added for Portal Prebid Test Site (publisher simulation)#7
Test mode added for Portal Prebid Test Site (publisher simulation)#7IlliaMil wants to merge 4 commits into
Conversation
Greptile SummaryThis PR extends the Startio bid adapter with test-mode support for publisher simulation environments, plus two minor data-mapping improvements. No structural changes to the bidding flow are made.
Confidence Score: 5/5The changes are additive and isolated to test-mode opt-in paths; production bid requests are unaffected unless a publisher explicitly sets the new params. All three new features (channel metadata, tagid mapping, test flags) follow existing patterns in the adapter and only activate when the publisher sets the corresponding params. The getEndpointUrl helper correctly extends the already-querystring-bearing ENDPOINT_URL with &testAdsEnabled=true. A previously noted issue around request.test not being explicitly set to 0 in the default case is the only open gap, and it is confined to a test assertion rather than production behavior. test/spec/modules/startioBidAdapter_spec.js — the expect(request.test).to.equal(0) assertion in the default case may behave differently depending on whether ortbConverter initializes the field. Important Files Changed
Sequence DiagramsequenceDiagram
participant Page as Publisher Page
participant Adapter as startioBidAdapter
participant SSP as Start.io SSP
Page->>Adapter: "buildRequests(bidRequests)<br/>params: {test, testAdsEnabled, placementId}"
Adapter->>Adapter: "converter.toORTB()<br/>→ imp.tagid = placementId<br/>→ request.ext.prebid.channel = {pbjs, version}<br/>→ request.test = 1 (if params.test)"
alt "params.testAdsEnabled = true"
Adapter->>SSP: "POST /getbid?account=pbc&testAdsEnabled=true"
else normal request
Adapter->>SSP: "POST /getbid?account=pbc"
end
SSP-->>Adapter: BidResponse (test creatives or live)
Adapter->>Page: interpretResponse → bids
Reviews (3): Last reviewed commit: "Enhance: Advertise Prebid channel name a..." | Re-trigger Greptile |
…he production endpoint
| if (bidParams?.test) { | ||
| request.test = 1; | ||
| } |
There was a problem hiding this comment.
Is bidParams.test different from bidRequest.params.testAdsEnabled on purpose?
It sounds like they should be the same variable (otherwise they might not be synced, and it'll cause an unexpected behavior)
No description provided.